package com.example.drawex;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

public class OptionMenuActivity_test extends Activity {

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.option_menu_test, menu);
		return true;
	}

	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// TODO Auto-generated method stub
		
		int id = item.getItemId();
    	Intent intent = null;
    	
    	switch(id) {
    	
    	case R.id.custom_view:
    		intent = new Intent(this, CustomViewActivity.class);
        	break;

    	case R.id.xmlview:
    		intent = new Intent(this, XMLViewActivity.class);
        	break;
        	
    	case R.id.draw_text:
    		intent = new Intent(this, DrawTextActivity.class);
        	break;
        	
    	case R.id.xmlimage:
    		intent = new Intent(this, XMLImageActivity.class);
        	break;
        	
    	case R.id.bitmap:
    		intent = new Intent(this, BitmapActivity.class);
        	break;
        	
    	case R.id.bitmap_scale:
    		intent = new Intent(this, BitmapScaleActivity.class);
        	break;
        	
    	case R.id.bitmap_matrix:
    		intent = new Intent(this, BitmapMatrixActivity.class);
        	break;
        
    	}
		
		
		return super.onOptionsItemSelected(item);
	}
	
}
